﻿using System;
using AnjLab.SyncIT.Core.Api;
using AnjLab.SyncIT.Core.Data.GoogleCode;
using NUnit.Framework;

namespace AnjLab.SyncIT.Core.Tests.Data.GoogleCode
{
    [TestFixture]
    public class TestGoogleCodeIssueDaoOnline
    {
        [Test]
        public void TestOutlookTracProject()
        {
            var source = new Source { ProjectBase = "outlooktrac", UserName = "dmitry.gusev" };

            var dao = new GoogleCodeIssueDao(source);

            source.SyncTimestamp = DateTime.Now.AddDays(-7);

            string[] ids = dao.GetChangedTasks();

            foreach (string id in ids)
            {
                var issue = (Issue) dao.Get(id);

                Console.WriteLine(issue + "\n\n");
            }
        }
    }
}